home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_lag_shipsight.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  123 lines

  1. # Jones 3D Cog Script
  2. #
  3. # lag_shipsight.cog
  4. #
  5. #
  6. # [DS & revised by HB]
  7. #
  8. # (C) 1998 LucasArts Entertainment Co. All Rights Reserved
  9. # ==============================================================================
  10.  
  11. symbols
  12.     
  13.     message     startup
  14.     message     entered
  15.  
  16.     keyframe    in_ltarmup=0in_leftarm_1_1.key    local
  17.     
  18.     sound        indyline=lg02j01.wav            local
  19.     sound        music0=mus_lag_japanship.wav    local
  20.  
  21.     thing        player                            local
  22.     thing        indyactor
  23.     thing        walkpos0
  24.     thing        walkpos1
  25.     thing        campos
  26.     thing        shippos
  27.     
  28.     sector        looksec
  29.  
  30.     vector        playervec                        local
  31.     vector        v_camspot                        local
  32.  
  33.     float        playery =0                        local
  34.     float        playerx =0                        local
  35.  
  36.     int            direction=0                        local
  37.     int            targdir=1                        local        desc=0-north,1-south,2-east,3-west.
  38.     int            curcam                            local
  39.     int            beenhere=0                        local
  40.     int            cursound                        local
  41.  
  42. end
  43.  
  44. # ========================================================================================
  45.  
  46. code
  47.  
  48. startup:
  49.  
  50.     player = GetLocalPlayerThing();
  51.     return;
  52.  
  53. entered:
  54.  
  55.     if (beenhere == 1) return;
  56.     if(getsenderref() == looksec)
  57.     {
  58.         curcam = GetCurrentCamera();
  59.  
  60.         MakeMeStop();
  61.         StartCutscene(1);
  62.         DeselectWeaponWait(player);
  63.         CopyPlayerHolsters(player, indyactor);
  64.         Sleep(0.01);
  65.             
  66.         SetThingFlags(player, 0x80000);
  67.         ClearThingFlags(indyactor, 0x80000);
  68.  
  69.         SetCameraLookInterp(2, 0);
  70.         SetCameraPosInterp(2, 0);
  71.         SetCameraFocus(2, campos);
  72.         SetCameraSecondaryFocus(2, indyactor);
  73.         SetCurrentCamera(2);
  74.         SetCameraFOV(30, 0, 0);
  75.         Sleep(0.01);
  76.         SetCameraFOV(90, 1, 5);
  77.         PlaySoundLocal(music0, 1.0, 0.0, 0x0, 0);
  78.  
  79.         AISetMoveSpeed(indyactor, 1.1);
  80.         SetThingMaxHeadVel(indyactor, 35.0);
  81.         SetThingMaxRotVel(indyactor, 25.0);
  82.         AISetLookThing(indyactor, walkpos0);
  83.         AISetMoveThing(indyactor, walkpos0, 0);
  84.         Sleep(2.2);
  85.         AISetMoveSpeed(indyactor, 1.0);
  86.         AISetLookThing(indyactor, walkpos1);
  87.         AISetMoveThing(indyactor, walkpos1, 0);
  88.         Sleep(1.2);
  89.         MoveToFrame(campos, 1, 0.85);
  90.         Sleep(2.3);
  91.  
  92.         SetThingMaxHeadVel(indyactor, 80.0);
  93.         SetThingMaxRotVel(indyactor, 60.0);
  94.         AIEnableHeadTracking(indyactor, shippos);
  95.         Sleep(0.7);
  96.         AISetLookThing(indyactor, shippos);
  97.         AIWaitForStop(indyactor);
  98.         AIDisableHeadTracking(indyactor);
  99.         CopyOrientAndPos(indyactor, player);
  100.         cursound = PlayVoice(player, indyline, 1.0, 0);
  101.         Sleep(3.5);
  102.         PlayKey(indyactor, in_ltarmup, 4, 0x12, 0);
  103.         WaitForSound(cursound);
  104.         Sleep(0.5);
  105.         ResetCameraFOV(0, 0.0);
  106.         SetThingFlags(indyactor, 0x80000);
  107.         ClearThingFlags(player, 0x80000);
  108.  
  109.         ## v_camspot = VectorAdd(VectorTransformToOrient(player, '-0.3 0.1 0.03'), GetThingPos(player));
  110.         ## SetCameraPosition(1, v_camspot);
  111.         SetCameraPosition(1, GetThingPos(campos));
  112.         SetCurrentCamera(curcam);
  113.         ResetCameraFOV(0, 0.0);
  114.         beenhere=1;
  115.         EndCutscene();
  116.         ClearActorFlags(player, 0x200000);
  117.     }
  118.  
  119.     return;
  120.  
  121. end
  122.  
  123.